package edu.sctu.wulixia.month4and5.day20150510.testtwo;

/**
 * Created by user05 on 2015/5/10.
 */
public class TestOne {

    int number = 5;

    public TestOne(int number){
        this.number = number;
        System.out.println(this.number);
    }

    public void getSum(){
        int sum = 0;
        for (int i = 0; i <number; i++) {
            sum += i;
        }
        System.out.println("相加之和：" + sum);
    }

}



